//
//  UIView+Ext.h
//  ICEubLib
//
//  Created by wujianrong on 16/4/11.
//  Copyright © 2016年 wanda. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>




#define ICE_VIEW_WIDTH(V)  V.frame.size.width
#define ICE_VIEW_HEIGHT(V) V.frame.size.height

#define ICE_VB(V)     V.iceViewBottem
#define ICE_VL(V)     V.iceViewLeft
#define ICE_VR(V)    V.iceViewRight
#define ICE_VT(V)     V.iceViewTop
#define ICE_VW(V)  V.frame.size.width
#define ICE_VH(V) V.frame.size.height


typedef NS_ENUM(NSInteger, ICEViewBoderEnum) {
    ICEVIEWBORDER_LEFT=0x01,
    ICEVIEWBORDER_RIGHT=0x02,
    ICEVIEWBORDER_TOP=0x04,
    ICEVIEWBORDER_BOTTEM=0x08,
    ICEVIEWALL=0x0f,
    ICEVIEWVERTICAL=0x01|0x02,
    ICEVIEWHORIZONETAL=0x04|0x08,
} ;

@interface UIView(wdice)

-(CGFloat)iceViewLeft;

-(CGFloat)iceViewTop;

-(CGFloat)iceViewRight;

-(CGFloat)iceViewBottem;


-(void)iceFitToHorizontalCenterWithView:(UIView*)view;
-(void)iceFitToVerticalCenterWithView:(UIView*)view;
-(void)iceMakeTopRightFrameWithPoint:(CGPoint)point width:(CGFloat)width height:(CGFloat)height;
-(void)iceModifyWidthToLeft:(CGFloat)width;
-(void)iceModifyWidthToRight:(CGFloat)width;
-(void)iceModifyWidth:(CGFloat)width;
-(void)iceModifyHeight:(CGFloat)height;
-(void)iceModifySize:(CGSize)size;
-(void)iceModifyOrigi:(CGPoint)point;
-(void)iceModifyX:(CGFloat)x;
-(void)iceModifyY:(CGFloat)y;
-(void)iceModifyRight:(CGFloat)right;
-(void)iceModifyBottem:(CGFloat)bottem;
-(void)iceModifyCenterX:(CGFloat)x;
-(void)iceModifyCenterY:(CGFloat)y;
-(void)iceSetTheSameBottemWithView:(UIView*)view;

-(void)iceRefreshBorderWithWidth:(CGFloat)width color:(UIColor*)color direction:(NSInteger)direction;

-(void)iceModifyCornerRadius:(CGFloat)cornerRadius;

-(void)iceModifyCornerRadius:(CGFloat)cornerRadius byRoundingCorners:(UIRectCorner)corners;


-(void)iceRemoveAllSubView;
-(void)iceRemoveAllSubViewExcept:(NSArray*)exceptViews;

+ (UIView *)iceFindKeyboard;
@end
